package abq2.jic.jic.plugin.operate.fastShowAI;

import kd.bos.form.control.events.BeforeItemClickEvent;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.report.plugin.AbstractReportFormPlugin;
import kd.bos.servicehelper.DispatchServiceHelper;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

/**
 * 报表界面插件
 */
public class ScoreFastAIShow extends AbstractReportFormPlugin implements Plugin {
    @Override
    public void registerListener(EventObject e) {
        super.registerListener(e);
        this.addClickListeners("abq2_recomand","abq2_score_analysis");
    }

    public void itemClick(ItemClickEvent evt) {
        super.itemClick(evt);
        String itemKey = evt.getItemKey();
        if (itemKey.equals("abq2_recomand")){
            String pageId = this.getView().getMainView().getPageId();
            Object pkValue = Long.parseLong("1953071178180473856");
            DispatchServiceHelper.invokeBizService("ai", "gai", "GaiService","selectProcessInSideBar",pkValue,pageId,"此技能用于学生成绩查询及学习资源推荐");
        }
        if (itemKey.equals("abq2_score_analysis")){
            String pageId = this.getView().getMainView().getPageId();
            Object pkValue = Long.parseLong("1953845065705076736");
            DispatchServiceHelper.invokeBizService("ai", "gai", "GaiService","selectProcessInSideBar",pkValue,pageId,"此技能用于学生成绩分析");
        }
    }

}